");
if (instance.options.googleanalyticsaccount && window._gaq) window._gaq.push(["_trackEvent", "Image", "Error", instance.elemArray[instance.curElem][ELEM_POSTER]])
});
imgLoader.src = this.elemArray[this.curElem][ELEM_POSTER]
},
getFlashMovieObject: function(movieName) {
if (window.document[movieName]) return window.document[movieName];
if (navigator.appName.indexOf("Microsoft Internet") == -1) {
if (document.embeds && document.embeds[movieName]) return document.embeds[movieName]
} else return document.getElementById(movieName)
},
playVideo: function() {
var type = this.elemArray[this.curElem][ELEM_TYPE];
if (type == TYPE_VIDEO_FLASH || type == TYPE_VIDEO_MP4 || type == TYPE_VIDEO_OGG || type == TYPE_VIDEO_WEBM)
if (this.isHTML5 && $("#html5gallery-elem-html5-video-" + this.id).length > 0) $("#html5gallery-elem-html5-video-" + this.id, this.container).get(0).play();
else {
var flashObj =
this.getFlashMovieObject("html5gallery-elem-video-flash-" + this.id);
if (flashObj && typeof flashObj.playVideo === "function") flashObj.playVideo()
}
},
stopAllPlaying: function() {
if ($("video").length) $("video").get(0).pause();
if ($("audio").length) $("audio").get(0).pause();
if (typeof html5GalleryObjects !== "undefined" && html5GalleryObjects && html5GalleryObjects.objects)
for (var i = 0; i < html5GalleryObjects.objects.length; i++) {
if (html5GalleryObjects.objects[i].id == this.id) continue;
try {
if (html5GalleryObjects.objects[i].ytPlayer &&
typeof html5GalleryObjects.objects[i].ytPlayer.pauseVideo == "function") html5GalleryObjects.objects[i].ytPlayer.pauseVideo();
if (html5GalleryObjects.objects[i].vimeoPlayer) html5GalleryObjects.objects[i].vimeoPlayer.api("pause")
} catch (err) {}
}
},
pauseVideo: function() {
var type = this.elemArray[this.curElem][ELEM_TYPE];
if (type == TYPE_VIDEO_FLASH || type == TYPE_VIDEO_MP4 || type == TYPE_VIDEO_OGG || type == TYPE_VIDEO_WEBM)
if (this.isHTML5 && $("#html5gallery-elem-html5-video-" + this.id).length > 0) $("#html5gallery-elem-html5-video-" +
this.id, this.container).get(0).pause();
else {
var flashObj = this.getFlashMovieObject("html5gallery-elem-video-flash-" + this.id);
if (flashObj && typeof flashObj.pauseVideo === "function") flashObj.pauseVideo()
}
},
showVideo: function(autoPlay, videoSwitching) {
if (this.options.stopallplaying) this.stopAllPlaying();
this.isVideoPlaying = true;
if (autoPlay && this.options.autoslideandplayafterfirstplayed) {
this.options.autoplayvideo = true;
this.isPaused = false
}
this.disableTouchSwipe = true;
var parent = this.isFullscreen ? this.$fullscreen :
this.$gallery;
var dataW = this.elemArray[this.curElem][ELEM_WIDTH];
var dataH = this.elemArray[this.curElem][ELEM_HEIGHT];
var w1, h1;
if (this.isFullscreen) {
var lw = this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH] ? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH], this.fullscreenWidth) : Math.min(dataW, this.fullscreenWidth);
var lh = this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT] ? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT], this.fullscreenHeight) : Math.min(dataH, this.fullscreenHeight);
this.adjustFullscreen(lw,
lh);
w1 = lw;
h1 = lh
} else {
$(".html5gallery-elem-" + this.id, this.$gallery).css({
"width": this.options.width,
"height": this.options.height
});
w1 = this.options.width;
h1 = this.options.height
}
var timeStamp = -1;
if (videoSwitching && $(".html5gallery-elem-" + this.id, parent).find("video").length) timeStamp = $(".html5gallery-elem-" + this.id, parent).find("video:first").get(0).currentTime;
$(".html5gallery-elem-" + this.id, parent).html("
" + this.options.watermarkcode);
this.isHTML5 = false;
if (this.options.isIE678 || this.options.isIE9 && this.options.useflashonie9 || this.options.isIE10 && this.options.useflashonie10 || this.options.isIE11 && this.options.useflashonie11) this.isHTML5 = false;
else if (this.options.isMobile) this.isHTML5 =
true;
else if ((this.options.html5player || !this.options.flashInstalled) && this.options.html5VideoSupported) {
this.isHTML5 = true;
if (this.options.isFirefox || this.options.isOpera)
if (!this.elemArray[this.curElem][ELEM_SRC_WEBM] && !this.elemArray[this.curElem][ELEM_SRC_OGG] && (!this.options.canplaymp4 || this.options.useflashformp4onfirefox)) this.isHTML5 = false
}
if (this.isHTML5) {
var videoSrc = this.elemArray[this.curElem][ELEM_SRC];
var videoHd = this.elemArray[this.curElem][ELEM_HD];
if (this.options.isFirefox || this.options.isOpera) {
if (this.elemArray[this.curElem][ELEM_SRC_WEBM]) videoSrc =
this.elemArray[this.curElem][ELEM_SRC_WEBM];
else if (this.elemArray[this.curElem][ELEM_SRC_OGG]) videoSrc = this.elemArray[this.curElem][ELEM_SRC_OGG];
if (this.elemArray[this.curElem][ELEM_HD_WEBM]) videoHd = this.elemArray[this.curElem][ELEM_HD_WEBM];
else if (this.elemArray[this.curElem][ELEM_HD_OGG]) videoHd = this.elemArray[this.curElem][ELEM_HD_OGG]
}
this.embedHTML5Video($(".html5gallery-elem-video-" + this.id, parent), w1, h1, videoSrc, videoHd, autoPlay, timeStamp, videoSwitching)
} else {
var videoFile = this.elemArray[this.curElem][ELEM_SRC];
if (videoFile.charAt(0) != "/" && videoFile.substring(0, 5) != "http:" && videoFile.substring(0, 6) != "https:") videoFile = this.options.htmlfolder + videoFile;
var hdFile = "";
if (this.elemArray[this.curElem][ELEM_HD]) {
hdFile = this.elemArray[this.curElem][ELEM_HD];
if (hdFile.charAt(0) != "/" && hdFile.substring(0, 5) != "http:" && hdFile.substring(0, 6) != "https:") hdFile = this.options.htmlfolder + hdFile
}
var flashvars = {
width: w1,
height: h1,
hidecontrols: this.options.videohidecontrols ? "1" : "0",
hideplaybutton: "0",
videofile: videoFile,
hdfile: hdFile,
ishd: this.isHd ? "1" : "0",
autoplay: autoPlay ? "1" : "0",
errorcss: ".html5box-error" + this.options.errorcss,
id: this.id
};
if (this.elemArray[this.curElem][ELEM_LINK]) {
flashvars.clickthrough = this.elemArray[this.curElem][ELEM_LINK];
if (this.elemArray[this.curElem][ELEM_LINKTARGET]) flashvars.clickthroughtarget = this.elemArray[this.curElem][ELEM_LINKTARGET]
}
this.embedFlash($(".html5gallery-elem-video-" + this.id, parent), "100%", "100%", this.options.jsfolder + "html5boxplayer.swf", "transparent", flashvars, "html5gallery-elem-video-flash-" +
this.id)
}
if (this.options.googleanalyticsaccount && window._gaq) window._gaq.push(["_trackEvent", "Video", "Play", this.elemArray[this.curElem][ELEM_SRC]])
},
showSWF: function() {
var parent = this.isFullscreen ? this.$fullscreen : this.$gallery;
var w1 = this.elemArray[this.curElem][ELEM_WIDTH];
var h1 = this.elemArray[this.curElem][ELEM_HEIGHT];
if (this.isFullscreen) this.adjustFullscreen(w1, h1);
else $(".html5gallery-elem-" + this.id, this.$gallery).css({
"width": this.options.width,
"height": this.options.height
});
var t1 = this.isFullscreen ?
0 : Math.round((this.options.height - h1) / 2) + (this.options.slideshadow ? 4 : 0);
var l1 = this.isFullscreen ? 0 : Math.round((this.options.width - w1) / 2) + (this.options.slideshadow ? 4 : 0);
$(".html5gallery-elem-" + this.id, parent).html("
" + this.options.watermarkcode);
this.embedFlash($(".html5gallery-elem-flash-" + this.id, parent), w1, h1, this.elemArray[this.curElem][ELEM_SRC],
"window", {}, "html5gallery-elem-flash-object-" + this.id);
if (this.options.googleanalyticsaccount && window._gaq) window._gaq.push(["_trackEvent", "Flash", "Play", this.elemArray[this.curElem][ELEM_SRC]])
},
prepareYoutubeHref: function(href) {
var youtubeId = href.match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2];
var result = "https://www.youtube.com/embed/" + youtubeId;
var params = this.getYoutubeParams(href);
var first = true;
for (var key in params) {
if (first) {
result += "?";
first = false
} else result += "&";
result +=
key + "=" + params[key]
}
return result
},
getYoutubeParams: function(href) {
var result = {};
if (href.indexOf("?") < 0) return result;
var params = href.substring(href.indexOf("?") + 1).split("&");
for (var i = 0; i < params.length; i++) {
var value = params[i].split("=");
if (value && value.length == 2 && value[0].toLowerCase() != "v") result[value[0].toLowerCase()] = value[1]
}
return result
},
initYoutubeApi: function() {
var i, initYoutube = false;
var initVimeo = false;
for (i = 0; i < this.elemArray.length; i++)
if (this.elemArray[i][ELEM_TYPE] == TYPE_VIDEO_YOUTUBE) initYoutube =
true;
else if (this.elemArray[i][ELEM_TYPE] == TYPE_VIDEO_VIMEO) initVimeo = true;
if (initYoutube) {
var tag = document.createElement("script");
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag)
}
if (initVimeo) {
var tag = document.createElement("script");
tag.src = this.options.jsfolder + "froogaloop2.min.js";
var firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag,
firstScriptTag)
}
},
showEmbedVideo: function(autoPlay) {
if (this.options.stopallplaying) this.stopAllPlaying();
this.isVideoPlaying = true;
if (autoPlay && this.options.autoslideandplayafterfirstplayed) {
this.options.autoplayvideo = true;
this.isPaused = false
}
var parent = this.isFullscreen ? this.$fullscreen : this.$gallery;
var dataW = this.elemArray[this.curElem][ELEM_WIDTH];
var dataH = this.elemArray[this.curElem][ELEM_HEIGHT];
var w1, h1;
if (this.isFullscreen) {
var lw = this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH] ? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],
this.fullscreenWidth) : Math.min(dataW, this.fullscreenWidth);
var lh = this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT] ? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT], this.fullscreenHeight) : Math.min(dataH, this.fullscreenHeight);
this.adjustFullscreen(lw, lh);
w1 = lw;
h1 = lh
} else {
$(".html5gallery-elem-" + this.id, this.$gallery).css({
"width": this.options.width,
"height": this.options.height
});
w1 = this.options.width;
h1 = this.options.height
}
var src = this.elemArray[this.curElem][ELEM_SRC];
$(".html5gallery-elem-" +
this.id, parent).html("
" + this.options.watermarkcode);
if (src.match(/\:\/\/.*(dai\.ly)/i)) {
var id = src.match(/(dai\.ly\/)([a-zA-Z0-9\-\_]+)/)[2];
src = "https://www.dailymotion.com/embed/video/" +
id
}
if (autoPlay)
if (src.indexOf("?") < 0) src += "?autoplay=1";
else src += "&autoplay=1";
$("#html5gallery-elem-video-" + this.id, parent).html("
");
if (this.options.googleanalyticsaccount && window._gaq) window._gaq.push(["_trackEvent", "Video", "Play", this.elemArray[this.curElem][ELEM_SRC]])
},
showYoutube: function(autoPlay) {
if (this.options.stopallplaying) this.stopAllPlaying();
this.isVideoPlaying =
true;
if (autoPlay && this.options.autoslideandplayafterfirstplayed) {
this.options.autoplayvideo = true;
this.isPaused = false
}
var parent = this.isFullscreen ? this.$fullscreen : this.$gallery;
var dataW = this.elemArray[this.curElem][ELEM_WIDTH];
var dataH = this.elemArray[this.curElem][ELEM_HEIGHT];
var w1, h1;
if (this.isFullscreen) {
var lw = this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH] ? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH], this.fullscreenWidth) : Math.min(dataW, this.fullscreenWidth);
var lh = this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT] ?
Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT], this.fullscreenHeight) : Math.min(dataH, this.fullscreenHeight);
this.adjustFullscreen(lw, lh);
w1 = lw;
h1 = lh
} else {
$(".html5gallery-elem-" + this.id, this.$gallery).css({
"width": this.options.width,
"height": this.options.height
});
w1 = this.options.width;
h1 = this.options.height
}
var src = this.elemArray[this.curElem][ELEM_SRC];
$(".html5gallery-elem-" + this.id, parent).html("
" + this.options.watermarkcode);
var instance = this;
if (!ASYouTubeIframeAPIReady) {
ASYouTubeTimeout += 100;
if (ASYouTubeTimeout < 3E3) {
setTimeout(function() {
instance.showYoutube(autoPlay)
}, 100);
return
}
}
if (ASYouTubeIframeAPIReady && !this.options.isMobile && !this.options.isIE6 && !this.options.isIE7) {
var id =
this.elemArray[this.curElem][ELEM_SRC].match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2];
var onPlayReady = null;
if (autoPlay) onPlayReady = function(event) {
event.target.playVideo()
};
var youtubeParams = this.getYoutubeParams(this.elemArray[this.curElem][ELEM_SRC]);
youtubeParams = $.extend({
"html5": 1,
"controls": instance.options.videohidecontrols ? "0" : "1",
"showinfo": instance.options.videohidecontrols ? "0" : "1",
"autoplay": autoPlay ? 1 : 0,
"rel": 0,
"wmode": "transparent"
}, youtubeParams);
this.ytPlayer = new YT.Player("html5gallery-elem-video-" +
this.id, {
width: w1,
height: h1,
videoId: id,
playerVars: youtubeParams,
events: {
"onReady": onPlayReady,
"onStateChange": function(event) {
if (event.data == YT.PlayerState.ENDED) {
instance.onVideoEnd();
if (!instance.isPaused) instance.slideRun(-1)
}
}
}
})
} else {
src = this.prepareYoutubeHref(src);
if (autoPlay)
if (src.indexOf("?") < 0) src += "?autoplay=1";
else src += "&autoplay=1";
if (src.indexOf("?") < 0) src += "?wmode=transparent&rel=0";
else src += "&wmode=transparent&rel=0";
if (instance.options.videohidecontrols) src += "&controls=0&showinfo=0";
$("#html5gallery-elem-video-" + this.id, parent).html("
")
}
if (this.options.googleanalyticsaccount && window._gaq) window._gaq.push(["_trackEvent", "Video", "Play", this.elemArray[this.curElem][ELEM_SRC]])
},
showVimeo: function(autoPlay) {
if (this.options.stopallplaying) this.stopAllPlaying();
this.isVideoPlaying = true;
if (autoPlay && this.options.autoslideandplayafterfirstplayed) {
this.options.autoplayvideo =
true;
this.isPaused = false
}
var instance = this;
if (typeof $f !== "function") {
ASVimeoTimeout += 100;
if (ASVimeoTimeout < 3E3) {
setTimeout(function() {
instance.showVimeo(autoPlay)
}, 100);
return
}
}
var parent = this.isFullscreen ? this.$fullscreen : this.$gallery;
var dataW = this.elemArray[this.curElem][ELEM_WIDTH];
var dataH = this.elemArray[this.curElem][ELEM_HEIGHT];
var w1, h1;
if (this.isFullscreen) {
var lw = this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH] ? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH], this.fullscreenWidth) :
Math.min(dataW, this.fullscreenWidth);
var lh = this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT] ? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT], this.fullscreenHeight) : Math.min(dataH, this.fullscreenHeight);
this.adjustFullscreen(lw, lh);
w1 = lw;
h1 = lh
} else {
$(".html5gallery-elem-" + this.id, this.$gallery).css({
"width": this.options.width,
"height": this.options.height
});
w1 = this.options.width;
h1 = this.options.height
}
var src = this.elemArray[this.curElem][ELEM_SRC];
if (src.indexOf("?") < 0) src += "?";
else src +=
"&";
if (autoPlay && !this.options.isAndroid) src += "autoplay=1";
else src += "autoplay=0";
src += "&api=1&player_id=html5gallery_vimeo_" + this.id;
$(".html5gallery-elem-" + this.id, parent).html("
" +
this.options.watermarkcode);
$(".html5gallery-elem-video-" + this.id, parent).html("
");
if (typeof $f === "function" && autoPlay && !this.options.isAndroid) {
var vimeoIframe = $("#html5gallery_vimeo_" + this.id)[0];
var instance = this;
instance.vimeoPlayer = $f(vimeoIframe);
instance.vimeoPlayer.addEvent("ready", function() {
instance.vimeoPlayer.addEvent("finish",
function(id) {
instance.onVideoEnd();
if (!instance.isPaused) instance.slideRun(-1)
})
})
}
if (this.options.googleanalyticsaccount && window._gaq) window._gaq.push(["_trackEvent", "Video", "Play", this.elemArray[this.curElem][ELEM_SRC]])
},
showIframe: function() {
var parent = this.isFullscreen ? this.$fullscreen : this.$gallery;
var dataW = this.elemArray[this.curElem][ELEM_WIDTH];
var dataH = this.elemArray[this.curElem][ELEM_HEIGHT];
var w1, h1;
if (this.isFullscreen) {
var lw = this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH] ? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],
this.fullscreenWidth) : Math.min(dataW, this.fullscreenWidth);
var lh = this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT] ? Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT], this.fullscreenHeight) : Math.min(dataH, this.fullscreenHeight);
this.adjustFullscreen(lw, lh);
w1 = lw;
h1 = lh
} else {
$(".html5gallery-elem-" + this.id, this.$gallery).css({
"width": this.options.width,
"height": this.options.height
});
w1 = this.options.width;
h1 = this.options.height
}
var src = this.elemArray[this.curElem][ELEM_SRC];
$(".html5gallery-elem-" +
this.id, parent).html("
" + this.options.watermarkcode);
$(".html5gallery-elem-iframe-" + this.id, parent).html("
");
if (this.options.googleanalyticsaccount && window._gaq) window._gaq.push(["_trackEvent", "Iframe", "Play", this.elemArray[this.curElem][ELEM_SRC]])
},
checkType: function(href) {
if (!href) return -1;
if (href.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i)) return TYPE_IMAGE;
if (href.match(/[^\.]\.(swf)\s*$/i)) return TYPE_SWF;
if (href.match(/[^\.]\.(mp3)\s*$/i)) return TYPE_MP3;
if (href.match(/[^\.]\.(pdf)\s*$/i)) return TYPE_PDF;
if (href.match(/\.(flv)(.*)?$/i)) return TYPE_VIDEO_FLASH;
if (href.match(/\.(mp4|m4v)(.*)?$/i)) return TYPE_VIDEO_MP4;
if (href.match(/\.(ogv|ogg)(.*)?$/i)) return TYPE_VIDEO_OGG;
if (href.match(/\.(webm)(.*)?$/i)) return TYPE_VIDEO_WEBM;
if (href.match(/\:\/\/.*(youtube\.com)/i) || href.match(/\:\/\/.*(youtu\.be)/i)) return TYPE_VIDEO_YOUTUBE;
if (href.match(/\:\/\/.*(vimeo\.com)/i)) return TYPE_VIDEO_VIMEO;
if (href.match(/\:\/\/.*(dailymotion\.com)/i) || href.match(/\:\/\/.*(dai\.ly)/i)) return TYPE_EMBED_VIDEO;
return TYPE_IMAGE
},
onChange: function() {
if (this.options.onchange && window[this.options.onchange] && typeof window[this.options.onchange] == "function") window[this.options.onchange](this.elemArray[this.curElem].concat([this.id]))
},
onSlideshowOver: function() {
if (this.options.onslideshowover && window[this.options.onslideshowover] && typeof window[this.options.onslideshowover] == "function") window[this.options.onslideshowover](this.elemArray[this.curElem])
},
onThumbOver: function(index) {
if (this.options.onthumbover && window[this.options.onthumbover] &&
typeof window[this.options.onthumbover] == "function") window[this.options.onthumbover](this.elemArray[index])
},
onThumbClick: function(index) {
if (this.options.onthumbclick && window[this.options.onthumbclick] && typeof window[this.options.onthumbclick] == "function") window[this.options.onthumbclick](this.elemArray[index].concat([this.id]));
if (this.options.thumbjumptotop)
if (this.options.thumbjumpanchor && this.options.thumbjumpanchor.length > 0 && $("#" + this.options.thumbjumpanchor).length > 0) {
var t0 = $("#" + this.options.thumbjumpanchor).offset().top;
$(window).scrollTop(t0)
} else if (this.options.thumbjumpposition >= 0) $(window).scrollTop(this.options.thumbjumpposition);
else {
var t = this.container.offset().top;
if (t < $(window).scrollTop()) $(window).scrollTop(t)
}
},
onVideoEnd: function() {
if (this.options.onvideoend && window[this.options.onvideoend] && typeof window[this.options.onvideoend] == "function") window[this.options.onvideoend](this.elemArray[this.curElem])
},
embedHTML5Video: function($container, w, h, src, hd, autoPlay, timeStamp, videoSwitching) {
var instance =
this;
if ((this.options.isIE11 || this.options.isIE) && this.options.usenativehtml5controlsonie || this.options.isFirefox && this.options.usenativehtml5controlsonfirefox) this.options.nativehtml5controls = true;
$container.html("
");
$("video", $container).get(0).setAttribute("src", (hd && this.isHd ? hd : src) + (timeStamp > 0 ? "#t=" + timeStamp : ""));
if (!this.options.nativehtml5controls && !this.options.videohidecontrols) {
$("video", $container).data("src", src);
$("video", $container).data("hd", hd);
$("video", $container).data("ishd", this.isHd);
$("video", $container).addHTML5VideoControls(this.options.skinfolder, this, "html5gallery-elem-html5-video-" + this.id)
}
if (this.elemArray[this.curElem][ELEM_LINK]) {
$("video", $container).css({
cursor: "pointer"
});
$("video", $container).off("click").on("click", function() {
if (instance.elemArray[instance.curElem][ELEM_LINK])
if (instance.elemArray[instance.curElem][ELEM_LINKTARGET]) window.open(instance.elemArray[instance.curElem][ELEM_LINK], instance.elemArray[instance.curElem][ELEM_LINKTARGET]);
else window.open(instance.elemArray[instance.curElem][ELEM_LINK])
})
}
if (autoPlay || videoSwitching) $("video", $container).get(0).play();
$("video", $container).off("ended").on("ended", function() {
instance.onVideoEnd();
if (!instance.isPaused) instance.slideRun(-1)
})
},
embedFlash: function($container, w, h, src, wmode, flashVars, objectId) {
if (this.options.flashInstalled) {
var htmlOptions = {
pluginspage: "http://www.adobe.com/go/getflashplayer",
quality: "high",
allowFullScreen: "true",
allowScriptAccess: "always",
type: "application/x-shockwave-flash"
};
htmlOptions.width = w;
htmlOptions.height = h;
htmlOptions.src = src;
htmlOptions.wmode = wmode;
$container.append('
');
window.HTML5GallerySWFObject = HTML5GallerySWFObjectFunc();
window.HTML5GallerySWFObject.embedSWF(src,
objectId, w, h, "9.0.0", false, flashVars, htmlOptions, {})
} else $container.html("
The required Adobe Flash Player plugin is not installed
")
}
};
this.each(function() {
var $this = $(this);
options = options || {};
for (var key in options)
if (key.toLowerCase() !== key) {
options[key.toLowerCase()] = options[key];
delete options[key]
}
if ($(this).data("donotinit") && (!options || !options["forceinit"])) return;
if ($(this).data("inited")) return;
$(this).data("inited", 1);
this.options = $.extend({}, options);
var instance = this;
$.each($this.data(), function(key, value) {
instance.options[key.toLowerCase()] = value
});
if ("skin" in this.options) this.options.skin = this.options.skin.toLowerCase();
var commonOptions = {
freelink: "http://www.wonderplugin.com/wordpress-gallery/",
watermark: "",
watermarklink: "",
skin: "horizontal",
googlefonts: "",
mobileresizeevent: true,
enabletouchswipe: true,
enabletouchswipeonandroid: true,
disablehovereventontouch: false,
responsive: false,
responsivefullscreen: false,
screenquery: {},
src: "",
xml: "",
xmlnocache: true,
stopallplaying: false,
lightbox: false,
autoslide: false,
slideshowinterval: 6E3,
random: false,
borderradius: 0,
loop: 0,
pauseonmouseover: false,
notupdatecarousel: false,
updatecarouselinterval: 6E4,
autoplayvideo: false,
html5player: true,
playvideoonclick: true,
videohidecontrols: false,
useflashformp4onfirefox: false,
nativehtml5controls: false,
hddefault: false,
useflashonie9: true,
useflashonie10: false,
useflashonie11: false,
usenativehtml5controlsonie: false,
usenativehtml5controlsonfirefox: false,
autoslideandplayafterfirstplayed: false,
lazyloadtags: "lazy-src,lazyload-src,cfsrc,src",
linkonlyonvideo: true,
hidetitlewhenvideoisplaying: false,
hideplaypausefullscreenwhenvideoisplaying: false,
lightboxborder: 8,
lightboxtextheight: 72,
lightboxmargin: 12,
lightboxbgcolor: "#fff",
lightboxshowtitle: true,
lightboxtitlecss: " {color:#333333; font:bold 12px Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; line-height:18px;}",
lightboxtitlelinkcss: " a {color:#333333;}",
lightboxshowdescription: true,
lightboxdescriptioncss: " {color:#333333; font:normal 12px Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; line-height:14px;}",
lightboxdescriptionlinkcss: " a {color:#333333;}",
effect: "fade",
easing: "easeOutCubic",
duration: 1500,
slide: {
duration: 1E3,
easing: "easeOutExpo"
},
width: 480,
height: 270,
showtimer: true,
resizemode: "fit",
showtitle: true,
titleheight: 45,
errorcss: " {text-align:center; color:#ff0000; font-size:14px; font-family:Arial, sans-serif;}",
shownumbering: false,
numberingformat: "%NUM / %TOTAL",
googleanalyticsaccount: "",
showsocialmedia: false,
socialheight: 30,
socialurlforeach: false,
showfacebooklike: true,
facebooklikeurl: "",
twitterurl: "",
twitterusername: "",
twittervia: "html5box",
showgoogleplus: true,
googleplusurl: "",
initsocial: false,
showsocial: false,
socialmode: "mouseover",
socialposition: "position:absolute;top:8px;right:8px;",
socialpositionlightbox: "position:absolute;top:8px;right:8px;",
socialdirection: "horizontal",
socialbuttonsize: 32,
socialbuttonfontsize: 18,
socialrotateeffect: true,
showfacebook: true,
showtwitter: true,
showpinterest: true,
showimagetoolbox: "always",
imagetoolboxstyle: "side",
imagetoolboxmode: "mouseover",
showplaybutton: true,
showprevbutton: true,
shownextbutton: true,
showfullscreenbutton: true,
showplaypausefullscreenforall: false,
showcarouselforsingle: false,
carouselbgtransparent: true,
carouselbgcolorstart: "#ffffff",
carouselbgcolorend: "#ffffff",
carouseltopborder: "#ffffff",
carouselbottomborder: "#ffffff",
carouselbgimage: "",
carouseleasing: "easeOutCirc",
carouselarrowwidth: 32,
carouselarrowheight: 32,
thumbresponsive: "samesize",
thumbcolumns: 5,
thumbcolumnsresponsive: false,
thumbmediumcolumns: 3,
thumbmediumsize: 800,
thumbsmallcolumns: 2,
thumbsmallsize: 480,
thumbmediumwidth: 64,
thumbmediumheight: 64,
thumbsmallwidth: 48,
thumbsmallheight: 48,
addthumbnailtitle: false,
carouselmultirows: false,
thumbrowgap: 16,
thumblinkintitle: false,
thumbjumptotop: false,
thumbjumpposition: -1,
thumbjumpanchor: "",
youtubeapikey: "",
youtubeplaylistid: "",
youtubeplaylistmaxresults: "",
youtubeplaylistusemaxres: true,
titlesmallscreen: false,
titlesmallscreenwidth: 640,
titleheightsmallscreen: 148,
version: "3.6",
fv: true,
fm: "87,111,114,100,80,114,101,115,115,32,71,97,108,108,101,114,121,32,70,114,101,101,32,86,101,114,115,105,111,110"
};
var horizontalSkinOptions = {
skinfolder: "skins/horizontal/",
padding: 6,
bgcolor: "#ffffff",
bgimage: "",
galleryshadow: true,
slideshadow: false,
showsocialmedia: false,
headerpos: "top",
showdescription: true,
titleoverlay: true,
titleautohide: true,
titlecss: " {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
titlecsslink: " a {color:#ffffff;}",
descriptioncss: " {color:#ffffff; font-size:13px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
descriptioncsslink: " a {color:#ffffff;}",
showcarousel: true,
carouselmargin: 0,
carouselbgtransparent: false,
carouselbgcolorstart: "#494f54",
carouselbgcolorend: "#292c31",
carouseltopborder: "#666666",
carouselbottomborder: "#111111",
thumbwidth: 64,
thumbheight: 48,
thumbgap: 4,
thumbmargin: 6,
thumbunselectedimagebordercolor: "#ffffff",
thumbimageborder: 1,
thumbimagebordercolor: "",
thumbshowplayonvideo: true,
thumbshadow: false,
thumbopacity: 0.8
};
var lightSkinOptions = {
padding: 12,
skinfolder: "skins/light/",
bgcolor: "",
bgimage: "",
galleryshadow: false,
slideshadow: true,
showsocialmedia: false,
headerpos: "top",
showdescription: true,
titleoverlay: true,
titleautohide: true,
titlecss: " {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
titlecsslink: " a {color:#ffffff;}",
descriptioncss: " {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
descriptioncsslink: " a {color:#ffffff;}",
showcarousel: true,
carouselmargin: 10,
carouselbgtransparent: true,
thumbwidth: 48,
thumbheight: 48,
thumbgap: 8,
thumbmargin: 12,
thumbunselectedimagebordercolor: "#fff",
thumbimageborder: 2,
thumbimagebordercolor: "#fff",
thumbshowplayonvideo: true,
thumbshadow: true,
thumbopacity: 0.8
};
var mediapageSkinOptions = {
padding: 0,
skinfolder: "skins/mediapage/",
bgcolor: "",
bgimage: "",
galleryshadow: false,
slideshadow: false,
showsocialmedia: false,
headerpos: "top",
showdescription: true,
titleoverlay: true,
titleautohide: true,
titlecss: " {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
titlecsslink: " a {color:#ffffff;}",
descriptioncss: " {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
descriptioncsslink: " a {color:#ffffff;}",
showcarousel: true,
carouselmargin: 24,
carouselmultirows: true,
thumbrowgap: 16,
carouselbgtransparent: true,
thumbwidth: 120,
thumbheight: 60,
thumbgap: 10,
thumbmargin: 12,
thumbunselectedimagebordercolor: "#fff",
thumbimageborder: 0,
thumbimagebordercolor: "#fff",
thumbshowplayonvideo: true,
thumbshadow: false,
thumbopacity: 0.8,
thumbjumptotop: true,
thumbshowtitle: true,
thumbtitlecss: "{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden;}",
thumbtitleheight: 24
};
var gallerySkinOptions = {
padding: 12,
skinfolder: "skins/gallery/",
bgcolor: "",
bgimage: "",
galleryshadow: false,
slideshadow: true,
showsocialmedia: false,
headerpos: "top",
showdescription: true,
titleoverlay: true,
titleautohide: true,
titlecss: " {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
titlecsslink: " a {color:#ffffff;}",
descriptioncss: " {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
descriptioncsslink: " a {color:#ffffff;}",
showcarousel: true,
carouselmargin: 10,
carouselbgtransparent: true,
thumbwidth: 120,
thumbheight: 60,
thumbgap: 8,
thumbmargin: 12,
thumbunselectedimagebordercolor: "#fff",
thumbimageborder: 2,
thumbimagebordercolor: "#fff",
thumbshowplayonvideo: true,
thumbshadow: true,
thumbopacity: 0.8,
thumbshowtitle: true,
thumbtitlecss: "{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal;}",
thumbtitleheight: 18
};
var galleryWithTextSkinOptions = {
padding: 12,
skinfolder: "skins/gallery/",
bgcolor: "",
bgimage: "",
galleryshadow: false,
slideshadow: true,
showsocialmedia: false,
headerpos: "bottom",
showdescription: true,
titleoverlay: false,
titleheight: 72,
titleautohide: true,
titlecss: "{color:#333;font-size:14px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:16px 8px 4px 8px;}",
titlecsslink: "a{color:#333;}",
descriptioncss: "{color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:4px 8px; }",
descriptioncsslink: "a{color:#333;}",
titlesmallscreen: true,
showcarousel: true,
carouselmargin: 10,
carouselbgtransparent: true,
thumbwidth: 120,
thumbheight: 60,
thumbgap: 8,
thumbmargin: 12,
thumbunselectedimagebordercolor: "#fff",
thumbimageborder: 2,
thumbimagebordercolor: "#fff",
thumbshowplayonvideo: true,
thumbshadow: true,
thumbopacity: 0.8,
thumbshowtitle: false,
thumbtitlecss: "{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal;}",
thumbtitleheight: 18
};
var galleryWithTextBottomSkinOptions = {
padding: 12,
skinfolder: "skins/gallery/",
bgcolor: "",
bgimage: "",
galleryshadow: false,
slideshadow: true,
showsocialmedia: false,
headerpos: "bottomoutside",
showdescription: true,
titleoverlay: false,
titleheight: 72,
titleautohide: true,
titlecss: "{color:#333;font-size:14px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:16px 8px 4px 8px;}",
titlecsslink: "a{color:#333;}",
descriptioncss: "{color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:4px 8px; }",
descriptioncsslink: "a{color:#333;}",
titlesmallscreen: true,
showcarousel: true,
carouselmargin: 10,
carouselbgtransparent: true,
thumbwidth: 120,
thumbheight: 60,
thumbgap: 8,
thumbmargin: 12,
thumbunselectedimagebordercolor: "#fff",
thumbimageborder: 2,
thumbimagebordercolor: "#fff",
thumbshowplayonvideo: true,
thumbshadow: true,
thumbopacity: 0.8,
thumbshowtitle: true,
thumbtitlecss: "{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal;}",
thumbtitleheight: 18
};
var darknessSkinOptions = {
skinfolder: "skins/darkness/",
padding: 12,
bgcolor: "#444444",
bgimage: "background.jpg",
galleryshadow: false,
slideshadow: false,
headerpos: "bottom",
showdescription: false,
titleoverlay: false,
titleautohide: false,
titlecss: " {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",
titlecsslink: " a {color:#ffffff;}",
descriptioncss: " {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",
descriptioncsslink: " a {color:#ffffff;}",
showcarousel: true,
carouselmargin: 8,
carouselbgtransparent: false,
carouselbgcolorstart: "#494f54",
carouselbgcolorend: "#292c31",
carouseltopborder: "#666666",
carouselbottomborder: "#111111",
thumbwidth: 64,
thumbheight: 48,
thumbgap: 4,
thumbmargin: 6,
thumbunselectedimagebordercolor: "#ffffff",
thumbimageborder: 1,
thumbimagebordercolor: "",
thumbshowplayonvideo: true,
thumbshadow: false,
thumbopacity: 0.8
};
var verticalSkinOptions = {
skinfolder: "skins/vertical/",
padding: 12,
bgcolor: "#444444",
bgimage: "background.jpg",
galleryshadow: false,
slideshadow: false,
headerpos: "bottom",
showdescription: false,
titleoverlay: false,
titleautohide: false,
titlecss: " {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",
titlecsslink: " a {color:#ffffff;}",
descriptioncss: " {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",
descriptioncsslink: " a {color:#ffffff;}",
showcarousel: true,
carouselmargin: 8,
carouselposition: "right",
carouselbgtransparent: false,
carouselbgcolorstart: "#494f54",
carouselbgcolorend: "#292c31",
carouseltopborder: "#666666",
carouselbottomborder: "#111111",
carouselhighlightbgcolorstart: "#999999",
carouselhighlightbgcolorend: "#666666",
carouselhighlighttopborder: "#cccccc",
carouselhighlightbottomborder: "#444444",
carouselhighlightbgimage: "",
thumbwidth: 148,
thumbheight: 48,
thumbgap: 2,
thumbmargin: 6,
thumbunselectedimagebordercolor: "",
thumbimageborder: 1,
thumbimagebordercolor: "#cccccc",
thumbshowplayonvideo: true,
thumbshadow: false,
thumbopacity: 0.8,
thumbshowimage: true,
thumbshowtitle: true,
thumbtitlecss: "{text-align:center; color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal;}"
};
var showcaseSkinOptions = {
skinfolder: "skins/showcase/",
padding: 12,
bgcolor: "#444444",
bgimage: "background.jpg",
galleryshadow: false,
slideshadow: false,
showsocialmedia: false,
headerpos: "bottom",
showdescription: false,
titleoverlay: false,
titleautohide: false,
titlecss: " {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",
titlecsslink: " a {color:#ffffff;}",
descriptioncss: " {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",
descriptioncsslink: " a {color:#ffffff;}",
showcarousel: true,
carouselmargin: 8,
carouselposition: "bottom",
carouselheight: 210,
carouselbgtransparent: false,
carouselbgcolorstart: "#494f54",
carouselbgcolorend: "#292c31",
carouseltopborder: "#666666",
carouselbottomborder: "#111111",
carouselhighlightbgcolorstart: "#999999",
carouselhighlightbgcolorend: "#666666",
carouselhighlighttopborder: "#cccccc",
carouselhighlightbottomborder: "#444444",
carouselhighlightbgimage: "",
thumbwidth: 148,
thumbheight: 60,
thumbgap: 2,
thumbmargin: 6,
thumbunselectedimagebordercolor: "",
thumbimageborder: 1,
thumbimagebordercolor: "#cccccc",
thumbshowplayonvideo: true,
thumbshadow: false,
thumbopacity: 0.8,
thumbshowimage: true,
thumbshowtitle: true,
thumbtitlecss: "{text-align:left; color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; padding: 6px 0;}",
thumbshowdescription: true,
thumbdescriptioncss: "{font-size:10px;}"
};
var sysOptions = commonOptions;
if (this.options.skin == "vertical") sysOptions = $.extend(sysOptions, verticalSkinOptions);
else if (this.options.skin == "showcase") sysOptions = $.extend(sysOptions, showcaseSkinOptions);
else if (this.options.skin ==
"light") sysOptions = $.extend(sysOptions, lightSkinOptions);
else if (this.options.skin == "gallery") sysOptions = $.extend(sysOptions, gallerySkinOptions);
else if (this.options.skin == "gallerywithtext") sysOptions = $.extend(sysOptions, galleryWithTextSkinOptions);
else if (this.options.skin == "gallerywithtextbottom") sysOptions = $.extend(sysOptions, galleryWithTextBottomSkinOptions);
else if (this.options.skin == "horizontal") sysOptions = $.extend(sysOptions, horizontalSkinOptions);
else if (this.options.skin == "darkness") sysOptions =
$.extend(sysOptions, darknessSkinOptions);
else if (this.options.skin == "mediapage") sysOptions = $.extend(sysOptions, mediapageSkinOptions);
else sysOptions = $.extend(sysOptions, horizontalSkinOptions);
this.options = $.extend(sysOptions, this.options);
this.options.titleheightlargescreen = this.options.titleheight;
if (this.options.lightbox) this.options.showfullscreenbutton = false;
if ("slideduration" in this.options) this.options.slide.duration = this.options.slideduration;
this.options.htmlfolder = window.location.href.substr(0,
window.location.href.lastIndexOf("/") + 1);
if (!this.options.jsfolder || !this.options.jsfolder.length) this.options.jsfolder = jsFolder;
if (this.options.skinfolder.charAt(0) != "/" && this.options.skinfolder.substring(0, 5) != "http:" && this.options.skinfolder.substring(0, 6) != "https:") this.options.skinfolder = this.options.jsfolder + this.options.skinfolder;
if (this.options.bgimage && this.options.bgimage.length > 0 && this.options.bgimage.substring(0, 7).toLowerCase() != "http://" && this.options.bgimage.substring(0, 8).toLowerCase() !=
"https://") this.options.bgimage = this.options.skinfolder + this.options.bgimage;
var i;
var l;
var mark = "";
var bytes = this.options.fm.split(",");
for (i = 0; i < bytes.length; i++) mark += String.fromCharCode(bytes[i]);
this.options.fvm = mark;
var d0 = "wmoangdiecrpluginh.iclolms";
for (i = 1; i <= 5; i++) d0 = d0.slice(0, i) + d0.slice(i + 1);
l = d0.length;
for (i = 0; i < 5; i++) d0 = d0.slice(0, l - 9 + i) + d0.slice(l - 8 + i);
if (this.options.htmlfolder.indexOf(d0) != -1) this.options.fv = false;
var screenWidth = $(window).width();
if (this.options.screenquery)
for (var i in this.options.screenquery)
if (screenWidth <=
this.options.screenquery[i].screenwidth) {
if (this.options.screenquery[i].gallerywidth) this.options.width = this.options.screenquery[i].gallerywidth;
if (this.options.screenquery[i].galleryheight) this.options.height = this.options.screenquery[i].galleryheight;
if (this.options.screenquery[i].thumbwidth) this.options.thumbwidth = this.options.screenquery[i].thumbwidth;
if (this.options.screenquery[i].thumbheight) this.options.thumbheight = this.options.screenquery[i].thumbheight
}
var galleryid;
if ("galleryid" in this.options) galleryid =
this.options.galleryid;
else {
galleryid = html5GalleryId;
html5GalleryId++
}
var html5GalleryObject = new Html5Gallery($this, this.options, galleryid);
$this.data("html5galleryobject", html5GalleryObject);
$this.data("html5galleryid", galleryid);
html5GalleryObjects.addObject(html5GalleryObject)
});
return this
}
})(jQuery);
jQuery(document).ready(function() {
jQuery(".wonderplugin-engine").css({
display: "none"
});
jQuery(".wonderplugingallery").wonderplugingallery()
})
}
function HTML5GalleryTimer(interval, callback, updatecallback) {
var timerInstance = this;
timerInstance.timeout = interval;
var updateinterval = 50;
var updateTimerId = null;
var runningTime = 0;
var paused = false;
var started = false;
var startedandpaused = false;
this.setInterval = function(interval) {
timerInstance.timeout = interval
};
this.pause = function() {
if (started) {
paused = true;
clearInterval(updateTimerId)
}
};
this.resume = function(forceresume) {
if (startedandpaused && !forceresume) return;
startedandpaused = false;
if (started && paused) {
paused =
false;
updateTimerId = setInterval(function() {
runningTime += updateinterval;
if (runningTime > timerInstance.timeout) {
clearInterval(updateTimerId);
if (callback) callback()
}
if (updatecallback) updatecallback(runningTime / timerInstance.timeout)
}, updateinterval)
}
};
this.stop = function() {
clearInterval(updateTimerId);
if (updatecallback) updatecallback(-1);
runningTime = 0;
paused = false;
started = false
};
this.start = function() {
runningTime = 0;
paused = false;
started = true;
updateTimerId = setInterval(function() {
runningTime += updateinterval;
if (runningTime > timerInstance.timeout) {
clearInterval(updateTimerId);
if (callback) callback()
}
if (updatecallback) updatecallback(runningTime / timerInstance.timeout)
}, updateinterval)
};
this.startandpause = function() {
runningTime = 0;
paused = true;
started = true;
startedandpaused = true
}
}
function HTML5GallerySWFObjectFunc() {
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
FLASH_MIME_TYPE = "application/x-shockwave-flash",
EXPRESS_INSTALL_ID = "SWFObjectExprInst",
ON_READY_STATE_CHANGE = "onreadystatechange",
win = window,
doc = document,
nav = navigator,
plugin = false,
domLoadFnArr = [main],
regObjArr = [],
objIdArr = [],
listenersArr = [],
storedAltContent, storedAltContentId, storedCallbackFn, storedCallbackObj, isDomLoaded = false,
isExpressInstallActive =
false,
dynamicStylesheet, dynamicStylesheetMedia, autoHideShow = true,
ua = function() {
var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
u = nav.userAgent.toLowerCase(),
p = nav.platform.toLowerCase(),
windows = p ? /win/.test(p) : /win/.test(u),
mac = p ? /mac/.test(p) : /mac/.test(u),
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,
ie = !+"\v1",
playerVersion = [0, 0, 0],
d = null;
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] ==
OBJECT) {
d = nav.plugins[SHOCKWAVE_FLASH].description;
if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) {
plugin = true;
ie = false;
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0
}
} else if (typeof win.ActiveXObject != UNDEF) try {
var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
if (a) {
d = a.GetVariable("$version");
if (d) {
ie = true;
d = d.split(" ")[1].split(",");
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]
}
}
} catch (e) {}
return {
w3: w3cdom,
pv: playerVersion,
wk: webkit,
ie: ie,
win: windows,
mac: mac
}
}(),
onDomLoad = function() {
if (!ua.w3) return;
if (typeof doc.readyState != UNDEF && doc.readyState == "complete" || typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body)) callDomLoadFunctions();
if (!isDomLoaded) {
if (typeof doc.addEventListener != UNDEF) doc.addEventListener("DOMContentLoaded",
callDomLoadFunctions, false);
if (ua.ie && ua.win) {
doc.attachEvent(ON_READY_STATE_CHANGE, function() {
if (doc.readyState == "complete") {
doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
callDomLoadFunctions()
}
});
if (win == top)(function() {
if (isDomLoaded) return;
try {
doc.documentElement.doScroll("left")
} catch (e) {
setTimeout(arguments.callee, 0);
return
}
callDomLoadFunctions()
})()
}
if (ua.wk)(function() {
if (isDomLoaded) return;
if (!/loaded|complete/.test(doc.readyState)) {
setTimeout(arguments.callee, 0);
return
}
callDomLoadFunctions()
})();
addLoadEvent(callDomLoadFunctions)
}
}();
function callDomLoadFunctions() {
if (isDomLoaded) return;
try {
var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
t.parentNode.removeChild(t)
} catch (e) {
return
}
isDomLoaded = true;
var dl = domLoadFnArr.length;
for (var i = 0; i < dl; i++) domLoadFnArr[i]()
}
function addDomLoadEvent(fn) {
if (isDomLoaded) fn();
else domLoadFnArr[domLoadFnArr.length] = fn
}
function addLoadEvent(fn) {
if (typeof win.addEventListener != UNDEF) win.addEventListener("load", fn, false);
else if (typeof doc.addEventListener !=
UNDEF) doc.addEventListener("load", fn, false);
else if (typeof win.attachEvent != UNDEF) addListener(win, "onload", fn);
else if (typeof win.onload == "function") {
var fnOld = win.onload;
win.onload = function() {
fnOld();
fn()
}
} else win.onload = fn
}
function main() {
if (plugin) testPlayerVersion();
else matchVersions()
}
function testPlayerVersion() {
var b = doc.getElementsByTagName("body")[0];
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
var t = b.appendChild(o);
if (t) {
var counter = 0;
(function() {
if (typeof t.GetVariable !=
UNDEF) {
var d = t.GetVariable("$version");
if (d) {
d = d.split(" ")[1].split(",");
ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]
}
} else if (counter < 10) {
counter++;
setTimeout(arguments.callee, 10);
return
}
b.removeChild(o);
t = null;
matchVersions()
})()
} else matchVersions()
}
function matchVersions() {
var rl = regObjArr.length;
if (rl > 0)
for (var i = 0; i < rl; i++) {
var id = regObjArr[i].id;
var cb = regObjArr[i].callbackFn;
var cbObj = {
success: false,
id: id
};
if (ua.pv[0] > 0) {
var obj = getElementById(id);
if (obj)
if (hasPlayerVersion(regObjArr[i].swfVersion) &&
!(ua.wk && ua.wk < 312)) {
setVisibility(id, true);
if (cb) {
cbObj.success = true;
cbObj.ref = getObjectById(id);
cb(cbObj)
}
} else if (regObjArr[i].expressInstall && canExpressInstall()) {
var att = {};
att.data = regObjArr[i].expressInstall;
att.width = obj.getAttribute("width") || "0";
att.height = obj.getAttribute("height") || "0";
if (obj.getAttribute("class")) att.styleclass = obj.getAttribute("class");
if (obj.getAttribute("align")) att.align = obj.getAttribute("align");
var par = {};
var p = obj.getElementsByTagName("param");
var pl = p.length;
for (var j = 0; j < pl; j++)
if (p[j].getAttribute("name").toLowerCase() != "movie") par[p[j].getAttribute("name")] = p[j].getAttribute("value");
showExpressInstall(att, par, id, cb)
} else {
displayAltContent(obj);
if (cb) cb(cbObj)
}
} else {
setVisibility(id, true);
if (cb) {
var o = getObjectById(id);
if (o && typeof o.SetVariable != UNDEF) {
cbObj.success = true;
cbObj.ref = o
}
cb(cbObj)
}
}
}
}
function getObjectById(objectIdStr) {
var r = null;
var o = getElementById(objectIdStr);
if (o && o.nodeName == "OBJECT")
if (typeof o.SetVariable != UNDEF) r = o;
else {
var n =
o.getElementsByTagName(OBJECT)[0];
if (n) r = n
}
return r
}
function canExpressInstall() {
return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312)
}
function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
isExpressInstallActive = true;
storedCallbackFn = callbackFn || null;
storedCallbackObj = {
success: false,
id: replaceElemIdStr
};
var obj = getElementById(replaceElemIdStr);
if (obj) {
if (obj.nodeName == "OBJECT") {
storedAltContent = abstractAltContent(obj);
storedAltContentId = null
} else {
storedAltContent =
obj;
storedAltContentId = replaceElemIdStr
}
att.id = EXPRESS_INSTALL_ID;
if (typeof att.width == UNDEF || !/%$/.test(att.width) && parseInt(att.width, 10) < 310) att.width = "310";
if (typeof att.height == UNDEF || !/%$/.test(att.height) && parseInt(att.height, 10) < 137) att.height = "137";
doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
fv = "MMredirectURL=" + win.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
if (typeof par.flashvars != UNDEF) par.flashvars +=
"&" + fv;
else par.flashvars = fv;
if (ua.ie && ua.win && obj.readyState != 4) {
var newObj = createElement("div");
replaceElemIdStr += "SWFObjectNew";
newObj.setAttribute("id", replaceElemIdStr);
obj.parentNode.insertBefore(newObj, obj);
obj.style.display = "none";
(function() {
if (obj.readyState == 4) obj.parentNode.removeChild(obj);
else setTimeout(arguments.callee, 10)
})()
}
createSWF(att, par, replaceElemIdStr)
}
}
function displayAltContent(obj) {
if (ua.ie && ua.win && obj.readyState != 4) {
var el = createElement("div");
obj.parentNode.insertBefore(el,
obj);
el.parentNode.replaceChild(abstractAltContent(obj), el);
obj.style.display = "none";
(function() {
if (obj.readyState == 4) obj.parentNode.removeChild(obj);
else setTimeout(arguments.callee, 10)
})()
} else obj.parentNode.replaceChild(abstractAltContent(obj), obj)
}
function abstractAltContent(obj) {
var ac = createElement("div");
if (ua.win && ua.ie) ac.innerHTML = obj.innerHTML;
else {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var i = 0; i < cl; i++)
if (!(c[i].nodeType ==
1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) ac.appendChild(c[i].cloneNode(true))
}
}
}
return ac
}
function createSWF(attObj, parObj, id) {
var r, el = getElementById(id);
if (ua.wk && ua.wk < 312) return r;
if (el) {
if (typeof attObj.id == UNDEF) attObj.id = id;
if (ua.ie && ua.win) {
var att = "";
for (var i in attObj)
if (attObj[i] != Object.prototype[i])
if (i.toLowerCase() == "data") parObj.movie = attObj[i];
else if (i.toLowerCase() == "styleclass") att += ' class="' + attObj[i] + '"';
else if (i.toLowerCase() != "classid") att += " " + i + '="' + attObj[i] + '"';
var par = "";
for (var j in parObj)
if (parObj[j] != Object.prototype[j]) par += '
';
el.outerHTML = '
";
objIdArr[objIdArr.length] = attObj.id;
r = getElementById(attObj.id)
} else {
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
for (var m in attObj)
if (attObj[m] != Object.prototype[m])
if (m.toLowerCase() == "styleclass") o.setAttribute("class", attObj[m]);
else if (m.toLowerCase() != "classid") o.setAttribute(m,
attObj[m]);
for (var n in parObj)
if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") createObjParam(o, n, parObj[n]);
el.parentNode.replaceChild(o, el);
r = o
}
}
return r
}
function createObjParam(el, pName, pValue) {
var p = createElement("param");
p.setAttribute("name", pName);
p.setAttribute("value", pValue);
el.appendChild(p)
}
function removeSWF(id) {
var obj = getElementById(id);
if (obj && obj.nodeName == "OBJECT")
if (ua.ie && ua.win) {
obj.style.display = "none";
(function() {
if (obj.readyState == 4) removeObjectInIE(id);
else setTimeout(arguments.callee,
10)
})()
} else obj.parentNode.removeChild(obj)
}
function removeObjectInIE(id) {
var obj = getElementById(id);
if (obj) {
for (var i in obj)
if (typeof obj[i] == "function") obj[i] = null;
obj.parentNode.removeChild(obj)
}
}
function getElementById(id) {
var el = null;
try {
el = doc.getElementById(id)
} catch (e) {}
return el
}
function createElement(el) {
return doc.createElement(el)
}
function addListener(target, eventType, fn) {
target.attachEvent(eventType, fn);
listenersArr[listenersArr.length] = [target, eventType, fn]
}
function hasPlayerVersion(rv) {
var pv =
ua.pv,
v = rv.split(".");
v[0] = parseInt(v[0], 10);
v[1] = parseInt(v[1], 10) || 0;
v[2] = parseInt(v[2], 10) || 0;
return pv[0] > v[0] || pv[0] == v[0] && pv[1] > v[1] || pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2] ? true : false
}
function createCSS(sel, decl, media, newStyle) {
if (ua.ie && ua.mac) return;
var h = doc.getElementsByTagName("head")[0];
if (!h) return;
var m = media && typeof media == "string" ? media : "screen";
if (newStyle) {
dynamicStylesheet = null;
dynamicStylesheetMedia = null
}
if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
var s = createElement("style");
s.setAttribute("type", "text/css");
s.setAttribute("media", m);
dynamicStylesheet = h.appendChild(s);
if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
dynamicStylesheetMedia = m
}
if (ua.ie && ua.win) {
if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) dynamicStylesheet.addRule(sel, decl)
} else if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"))
}
function setVisibility(id,
isVisible) {
if (!autoHideShow) return;
var v = isVisible ? "visible" : "hidden";
if (isDomLoaded && getElementById(id)) getElementById(id).style.visibility = v;
else createCSS("#" + id, "visibility:" + v)
}
function urlEncodeIfNecessary(s) {
var regex = /[\\\"<>\.;]/;
var hasBadChars = regex.exec(s) != null;
return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s
}
var cleanup = function() {
if (ua.ie && ua.win) window.attachEvent("onunload", function() {
var ll = listenersArr.length;
for (var i = 0; i < ll; i++) listenersArr[i][0].detachEvent(listenersArr[i][1],
listenersArr[i][2]);
var il = objIdArr.length;
for (var j = 0; j < il; j++) removeSWF(objIdArr[j]);
for (var k in ua) ua[k] = null;
ua = null;
if (window.AmazingSWFObject) {
for (var l in window.AmazingSWFObject) window.AmazingSWFObject[l] = null;
window.AmazingSWFObject = null
}
})
}();
return {
registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
if (ua.w3 && objectIdStr && swfVersionStr) {
var regObj = {};
regObj.id = objectIdStr;
regObj.swfVersion = swfVersionStr;
regObj.expressInstall = xiSwfUrlStr;
regObj.callbackFn = callbackFn;
regObjArr[regObjArr.length] = regObj;
setVisibility(objectIdStr, false)
} else if (callbackFn) callbackFn({
success: false,
id: objectIdStr
})
},
getObjectById: function(objectIdStr) {
if (ua.w3) return getObjectById(objectIdStr)
},
embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
var callbackObj = {
success: false,
id: replaceElemIdStr
};
if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
setVisibility(replaceElemIdStr,
false);
addDomLoadEvent(function() {
widthStr += "";
heightStr += "";
var att = {};
if (attObj && typeof attObj === OBJECT)
for (var i in attObj) att[i] = attObj[i];
att.data = swfUrlStr;
att.width = widthStr;
att.height = heightStr;
var par = {};
if (parObj && typeof parObj === OBJECT)
for (var j in parObj) par[j] = parObj[j];
if (flashvarsObj && typeof flashvarsObj === OBJECT)
for (var k in flashvarsObj)
if (typeof par.flashvars != UNDEF) par.flashvars += "&" + k + "=" + flashvarsObj[k];
else par.flashvars = k + "=" + flashvarsObj[k];
if (hasPlayerVersion(swfVersionStr)) {
var obj =
createSWF(att, par, replaceElemIdStr);
if (att.id == replaceElemIdStr) setVisibility(replaceElemIdStr, true);
callbackObj.success = true;
callbackObj.ref = obj
} else if (xiSwfUrlStr && canExpressInstall()) {
att.data = xiSwfUrlStr;
showExpressInstall(att, par, replaceElemIdStr, callbackFn);
return
} else setVisibility(replaceElemIdStr, true);
if (callbackFn) callbackFn(callbackObj)
})
} else if (callbackFn) callbackFn(callbackObj)
},
switchOffAutoHideShow: function() {
autoHideShow = false
},
ua: ua,
getFlashPlayerVersion: function() {
return {
major: ua.pv[0],
minor: ua.pv[1],
release: ua.pv[2]
}
},
hasFlashPlayerVersion: hasPlayerVersion,
createSWF: function(attObj, parObj, replaceElemIdStr) {
if (ua.w3) return createSWF(attObj, parObj, replaceElemIdStr);
else return undefined
},
showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
if (ua.w3 && canExpressInstall()) showExpressInstall(att, par, replaceElemIdStr, callbackFn)
},
removeSWF: function(objElemIdStr) {
if (ua.w3) removeSWF(objElemIdStr)
},
createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
if (ua.w3) createCSS(selStr,
declStr, mediaStr, newStyleBoolean)
},
addDomLoadEvent: addDomLoadEvent,
addLoadEvent: addLoadEvent,
getQueryParamValue: function(param) {
var q = doc.location.search || doc.location.hash;
if (q) {
if (/\?/.test(q)) q = q.split("?")[1];
if (param == null) return urlEncodeIfNecessary(q);
var pairs = q.split("&");
for (var i = 0; i < pairs.length; i++)
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) return urlEncodeIfNecessary(pairs[i].substring(pairs[i].indexOf("=") + 1))
}
return ""
},
expressInstallCallback: function() {
if (isExpressInstallActive) {
var obj =
getElementById(EXPRESS_INSTALL_ID);
if (obj && storedAltContent) {
obj.parentNode.replaceChild(storedAltContent, obj);
if (storedAltContentId) {
setVisibility(storedAltContentId, true);
if (ua.ie && ua.win) storedAltContent.style.display = "block"
}
if (storedCallbackFn) storedCallbackFn(storedCallbackObj)
}
isExpressInstallActive = false
}
}
}
}
var html5GalleryObjects = new function() {
this.objects = [];
this.addObject = function(obj) {
this.objects.push(obj)
};
this.loadNext = function(id) {
this.objects[id].onVideoEnd();
if (!this.objects[id].isPaused) this.objects[id].slideRun(-1)
};
this.setHd = function(id, isHd, switching) {
this.objects[id].setHd(isHd, switching)
};
this.gotoSlide = function(slideId, galleryId) {
if (typeof galleryId === "undefined") galleryId = 0;
if (this.objects[galleryId]) this.objects[galleryId].slideRun(slideId)
}
};
if (typeof ASYouTubeIframeAPIReady === "undefined") {
var ASYouTubeIframeAPIReady = false;
var ASYouTubeTimeout = 0;
function onYouTubeIframeAPIReady() {
ASYouTubeIframeAPIReady = true
}
}
var ASVimeoTimeout = 0;
// source --> //netsu.com.br/wp-content/themes/factory/js/src/cond/owl.carousel.min.js?ver=4.9.20
"function"!==typeof Object.create&&(Object.create=function(f){function g(){}g.prototype=f;return new g});
(function(f,g,k){var l={init:function(a,b){this.$elem=f(b);this.options=f.extend({},f.fn.owlCarousel.options,this.$elem.data(),a);this.userOptions=a;this.loadContent()},loadContent:function(){function a(a){var d,e="";if("function"===typeof b.options.jsonSuccess)b.options.jsonSuccess.apply(this,[a]);else{for(d in a.owl)a.owl.hasOwnProperty(d)&&(e+=a.owl[d].item);b.$elem.html(e)}b.logIn()}var b=this,e;"function"===typeof b.options.beforeInit&&b.options.beforeInit.apply(this,[b.$elem]);"string"===typeof b.options.jsonPath?
(e=b.options.jsonPath,f.getJSON(e,a)):b.logIn()},logIn:function(){this.$elem.data("owl-originalStyles",this.$elem.attr("style"));this.$elem.data("owl-originalClasses",this.$elem.attr("class"));this.$elem.css({opacity:0});this.orignalItems=this.options.items;this.checkBrowser();this.wrapperWidth=0;this.checkVisible=null;this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass();this.eventTypes();this.$userItems=this.$elem.children();this.itemsAmount=this.$userItems.length;
this.wrapItems();this.$owlItems=this.$elem.find(".owl-item");this.$owlWrapper=this.$elem.find(".owl-wrapper");this.playDirection="next";this.prevItem=0;this.prevArr=[0];this.currentItem=0;this.customEvents();this.onStartup()},onStartup:function(){this.updateItems();this.calculateAll();this.buildControls();this.updateControls();this.response();this.moveEvents();this.stopOnHover();this.owlStatus();!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle);!0===this.options.autoPlay&&
(this.options.autoPlay=5E3);this.play();this.$elem.find(".owl-wrapper").css("display","block");this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility();this.onstartup=!1;this.eachMoveUpdate();"function"===typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad();!0===this.options.autoHeight&&this.autoHeight();this.onVisibleItems();"function"===typeof this.options.afterAction&&this.options.afterAction.apply(this,
[this.$elem])},updateVars:function(){"function"===typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]);this.watchVisibility();this.updateItems();this.calculateAll();this.updatePosition();this.updateControls();this.eachMoveUpdate();"function"===typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var a=this;g.setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;if(!1===a.$elem.is(":visible"))a.$elem.css({opacity:0}),
g.clearInterval(a.autoPlayInterval),g.clearInterval(a.checkVisible);else return!1;a.checkVisible=g.setInterval(function(){a.$elem.is(":visible")&&(a.reload(),a.$elem.animate({opacity:1},200),g.clearInterval(a.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('
').wrap('
');this.$elem.find(".owl-wrapper").wrap('
');this.wrapperOuter=this.$elem.find(".owl-wrapper-outer");this.$elem.css("display","block")},
baseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall=
!1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;b
this.itemsAmount&&
!0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a=
this,b=0,e=a.itemsAmount-a.options.items;a.$owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data("owl-item",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data("owl-roundPages",b)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/
this.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('');a.owlControls.append(b);a.buttonPrev=
f("",{"class":"owl-prev",html:a.options.navigationText[0]||""});a.buttonNext=f("",{"class":"owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()});b.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(b){b.preventDefault();f(this).hasClass("owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper=
f('');a.owlControls.append(a.paginationWrapper);a.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(b){b.preventDefault();Number(f(this).data("owl-page"))!==a.currentItem&&a.goTo(Number(f(this).data("owl-page")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html("");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c",{"class":"owl-page"}),g=f("",{text:!0===this.options.paginationNumbers?a:"","class":!0===this.options.paginationNumbers?"owl-numbers":""}),d.append(g),d.data("owl-page",b===c?e:c),d.data("owl-roundPages",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(".owl-page").each(function(){f(this).data("owl-roundPages")===
f(a.$owlItems[a.currentItem]).data("owl-roundPages")&&(a.paginationWrapper.find(".owl-page").removeClass("active"),f(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem===
this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(a){if(this.isTransition)return!1;
this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a="rewind";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a="rewind";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;"function"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.owl.currentItem=a;if(!1!==c.options.transitionStyle&&"drag"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0),
!0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed("paginationSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):"rewind"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed("slideSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},
c.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):"rewind"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){"function"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem=
this.owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());"function"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop";g.clearInterval(this.autoPlayInterval)},
checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus="play";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){"slideSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!==typeof a&&this.$owlWrapper.css(this.addCssSpeed(a))},
addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+
a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){this.$owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement("div");a.style.cssText=" -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)";
a=a.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);this.browser={support3d:null!==a&&1===a.length,isTouch:"ontouchstart"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=["s","e","x"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:
!1===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=["mousedown.owl","mousemove.owl","mouseup.owl"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(a){a.preventDefault()});this.$elem.on("mousedown.disableTextSelect",function(a){return f(a.target).is("input, textarea, select, option")})},
gestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){"on"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):"off"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos;
"function"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10d.newPosY)&&!1===h.sliding&&f(k).off("touchmove.owl");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)}
function c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$owlWrapper.removeClass("grabbing");d.dragDirection=0>d.newRelativeX?d.owl.dragDirection="left":d.owl.dragDirection="right";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,"drag"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on("click.disable",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off("click.disable")}),
a=f._data(a.target,"events").click,c=a.pop(),a.splice(0,0,c)));b("off")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,".owl-wrapper",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1;
!1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$owlWrapper.hasClass("grabbing")||d.$owlWrapper.addClass("grabbing");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b("on");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem=
a=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20(b[d+1]||b[d]-a.itemWidth)&&"right"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)):
(c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a="right",this.playDirection="next"):(a="left",this.playDirection="prev");return a},customEvents:function(){var a=this;a.$elem.on("owl.next",function(){a.next()});a.$elem.on("owl.prev",function(){a.prev()});a.$elem.on("owl.play",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus="play"});a.$elem.on("owl.stop",function(){a.stop();a.hoverStatus="stop"});a.$elem.on("owl.goTo",function(b,e){a.goTo(e)});
a.$elem.on("owl.jumpTo",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a=this.currentItem:!0)&&e=f?g.setTimeout(c,100):e()}var d=this,f=0,k;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),k=!0):b[0].src=b.data("src");c()},autoHeight:function(){function a(){var a=f(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css("height",a+"px");e.wrapperOuter.hasClass("autoHeight")||g.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b,
100):e.wrapperOuter.css("height","")}var e=this,c=f(e.$owlItems[e.currentItem]).find("img"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||"undefined"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$owlItems.removeClass("active");this.visibleItems=[];for(a=this.currentItem;a=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.owlCarousel=function(a){return this.each(function(){if(!0===
f(this).data("owl-init"))return!1;f(this).data("owl-init",!0);var b=Object.create(l);b.init(a,this);f.data(this,"owlCarousel",b)})};f.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:300,paginationSpeed:800,rewindSpeed:1E3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,
responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:g,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}})(jQuery,window,document);
// source --> //netsu.com.br/wp-content/themes/factory/js/src/cond/modernizr.js?ver=4.9.20
/* Modernizr 2.7.1 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-csstransitions-shiv-cssclasses-prefixed-testprop-testallprops-domprefixes-load
*/
;window.Modernizr=function(a,b,c){function x(a){j.cssText=a}function y(a,b){return x(prefixes.join(a+";")+(b||""))}function z(a,b){return typeof a===b}function A(a,b){return!!~(""+a).indexOf(b)}function B(a,b){for(var d in a){var e=a[d];if(!A(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:z(f,"function")?f.bind(d||b):f}return!1}function D(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+n.join(d+" ")+d).split(" ");return z(b,"string")||z(b,"undefined")?B(e,b):(e=(a+" "+o.join(d+" ")+d).split(" "),C(e,b,c))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m="Webkit Moz O ms",n=m.split(" "),o=m.toLowerCase().split(" "),p={},q={},r={},s=[],t=s.slice,u,v={}.hasOwnProperty,w;!z(v,"undefined")&&!z(v.call,"undefined")?w=function(a,b){return v.call(a,b)}:w=function(a,b){return b in a&&z(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=t.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(t.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(t.call(arguments)))};return e}),p.csstransitions=function(){return D("transition")};for(var E in p)w(p,E)&&(u=E.toLowerCase(),e[u]=p[E](),s.push((e[u]?"":"no-")+u));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)w(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},x(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._domPrefixes=o,e._cssomPrefixes=n,e.testProp=function(a){return B([a])},e.testAllProps=D,e.prefixed=function(a,b,c){return b?D(a,b,c):D(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+s.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f //netsu.com.br/wp-content/themes/factory/js/src/cond/scrollfix.js?ver=4.9.20
( function ( $ ) {
"use strict";
$(document).ready(function() {
var Shira;
(function (Shira, $) {
(function (ScrollFix) {
/**
* @constructor
*
* @param {HTMLElement} element DOM element that is going to be fixed
* @param {Object} options option map
*/
ScrollFix.Watcher = function (element, options) {
this.element = element;
this.options = $.extend({}, ScrollFix.Watcher.defaults, options);
};
ScrollFix.Watcher.defaults = {
fixClass: 'scroller',
fixTop: 0,
fixOffset: 0,
unfixOffset: 0,
onUpdateFixed: null,
syncSize: true,
syncPosition: true,
style: true
};
ScrollFix.Watcher.prototype = {
element: null,
substitute: null,
options: null,
fixed: false,
attached: false,
/**
* Get absolute X position of the given element
*
* @param {HTMLElement} elem
* @returns {Number}
*/
getElementX: function (elem) {
var x = 0;
do x += elem.offsetLeft;
while (elem = elem.offsetParent);
return x;
},
/**
* Get absolute Y position of the given element
*
* @param {HTMLElement} elem
* @returns {Number}
*/
getElementY: function (elem) {
var y = 0;
do y += elem.offsetTop;
while (elem = elem.offsetParent);
return y;
},
/**
* Fix the element
*/
fix: function () {
// create the substitute
this.substitute = $(this.element.cloneNode(false))
.css('visibility', 'hidden')
.height($(this.element).height())
.insertAfter(this.element)[0]
;
// add class and styles
if (this.options.style) {
$(this.element)
.css('position', 'fixed')
.css('top', this.options.fixTop + 'px')
;
}
$(this.element).addClass(this.options.fixClass);
},
/**
* Update the fixed element
*/
updateFixed: function () {
// size
if (this.options.syncSize) {
$(this.element)
.width($(this.substitute).width())
;
}
// position
if (this.options.syncPosition) {
var currentScrollLeft = $(window).scrollLeft();
var substituteLeftOffset = this.getElementX(this.substitute);
$(this.element).css('left', (substituteLeftOffset - currentScrollLeft) + 'px');
}
// callback
if (null !== this.options.onUpdateFixed) {
this.options.onUpdateFixed(this);
}
},
/**
* Unfix the element
*/
unfix: function () {
// remove the substitute
$(this.substitute).remove();
this.substitute = null;
// reset applied styles and remove class
var cssReset = {};
if (this.options.syncPosition) {
cssReset.left = '';
}
if (this.options.syncSize) {
cssReset.width = '';
}
if (this.options.style) {
cssReset.position = '';
cssReset.top = '';
}
$(this.element)
.css(cssReset)
.removeClass(this.options.fixClass)
;
},
/**
* Attach the watcher
*/
attach: function () {
if (this.attached) {
throw new Error('Already attached');
}
var that = this;
this.updateEventHandler = function () {
that.pulse();
};
$(window)
.scroll(this.updateEventHandler)
.resize(this.updateEventHandler)
;
this.attached = true;
this.pulse();
},
/**
* Detach the watcher
*/
detach: function () {
if (!this.attached) {
throw new Error('Not attached');
}
$(window)
.unbind('scroll', this.updateEventHandler)
.unbind('resize', this.updateEventHandler)
;
this.attached = false;
},
/**
* Pulse the watcher
*/
pulse: function () {
var currentScroll = $(window).scrollTop();
if (this.fixed) {
if (currentScroll <= this.getElementY(this.substitute) + this.options.unfixOffset) {
this.unfix();
this.fixed = false;
} else {
this.updateFixed();
}
} else {
if (currentScroll >= this.getElementY(this.element) + this.options.fixOffset) {
this.fix();
this.fixed = true;
this.updateFixed();
}
}
}
};
// jQuery methods
/**
* Attach a watcher to the matched element
*
* @param {Object} options watcher option map
* @returns {ScrollFix.Watcher|Boolean} false if no element was matched
*/
$.fn.scrollFix = function (options) {
var element = this[0];
if (element) {
var watcher = new ScrollFix.Watcher(element, options);
watcher.attach();
return watcher;
}
return false;
};
})(Shira.ScrollFix || (Shira.ScrollFix = {}));
})(Shira || (Shira = {}), jQuery);
});
}( jQuery ) );